feat(compliance): add ens for azure and gcp #5746
Open
+3,137
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces several changes to enhance the compliance reporting capabilities for Azure and GCP in the
prowler
project. The most significant changes include the addition of new compliance frameworks for Azure and GCP, updates to theprowler
main script to handle these new frameworks, and the creation of corresponding test cases.Compliance Frameworks Enhancements:
prowler/__main__.py
: Added support for Azure and GCP ENS compliance frameworks by importingAzureENS
andGCPENS
classes and updating theprowler
function to handle these new compliance types. [1] [2] [3]prowler/lib/outputs/compliance/ens/ens_azure.py
: Introduced theAzureENS
class to represent Azure ENS compliance output, including methods to transform findings into Azure ENS compliance format.prowler/lib/outputs/compliance/ens/ens_gcp.py
: Introduced theGCPENS
class to represent GCP ENS compliance output, including methods to transform findings into GCP ENS compliance format.Codebase Updates:
prowler/lib/outputs/compliance/ens/ens.py
: Modified theget_ens_table
function to generalize the ENS compliance framework handling, removing the specific check for AWS.prowler/lib/outputs/compliance/ens/models.py
: AddedAzureENSModel
andGCPENSModel
classes to generate findings' output in CSV ENS format for Azure and GCP, respectively.Documentation and Testing:
README.md
: Updated the compliance frameworks section to reflect the new compliance checks available for Azure and GCP.tests/lib/outputs/compliance/ens/ens_azure_test.py
: Added test cases for theAzureENS
class to ensure the correct transformation of findings and proper CSV output generation.Checklist
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.